package tn.esti.projet;


import android.annotation.SuppressLint;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.view.Menu;
import android.view.MenuItem;
import android.view.Window;

public class SplashScreen extends Activity {
	  private final int SPLASH_DISPLAY_LENGTH = 3000;

	@SuppressLint("NewApi")
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		 getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
         getActionBar().hide();
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_splash_screen);
	       new Handler().postDelayed(new Runnable(){
	           @Override
	            public void run() {
	                /* Create an Intent that will start the Menu-Activity. */
	                Intent mainIntent = new Intent(SplashScreen.this,MainActivity.class);
	                SplashScreen.this.startActivity(mainIntent);
	                SplashScreen.this.finish();
	            }
	        }, SPLASH_DISPLAY_LENGTH);
	
	}
}
